package de.koller.retrograde.response;

import de.koller.aframe.util.resource.IOLoader;
import de.koller.aframe.util.web.basicHTML.BasicWebServer;
import de.koller.aframe.util.web.basicHTML.ImageSender;
import de.koller.oceanFramework.gl.util.RasterManager;
import de.koller.oceanFramework.util.ColorIntUtil;
import de.koller.retrograde.RRoot;
import java.awt.image.BufferedImage;

public class TileImgSender extends ImageSender {

	public TileImgSender( BasicWebServer wroot ) {
		super( wroot );

	}

	@Override
	public BufferedImage getImage( String request ) {
		RasterManager m = new RasterManager( 10, 10 );
		m.clear( ColorIntUtil.getIntColor( 0xff, 
				RRoot.RND.nextInt( 0xff ), 
				RRoot.RND.nextInt( 0xff ),
				RRoot.RND.nextInt( 0xff ) ) );
		return IOLoader.create( m );
	}

}
